package com.heima.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.heima.pojo.TbBusiness;
import com.heima.mapper.TbBusinessMapper;
import com.heima.pojo.vo.TbBusinessVo;
import com.heima.service.ITbBusinessService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 商圈表 服务实现类
 * </p>
 *
 * @author AkiRinko
 * @since 2024-06-08
 */
@Service
@RequiredArgsConstructor
public class TbBusinessServiceImpl extends ServiceImpl<TbBusinessMapper, TbBusiness> implements ITbBusinessService {
    private final TbBusinessMapper tbBusinessMapper;

    /**
     * 查询商圈列表
     *
     * @return
     */
    @Override
    public List<TbBusinessVo> selectBusiness() {
        List<TbBusiness> tbBusinesses = tbBusinessMapper.selectList(null);
        return BeanUtil.copyToList(tbBusinesses, TbBusinessVo.class);
    }
}
